package com.token.iot.bratterycharging.boss.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.outstanding.framework.core.PageInfo;
import com.token.iot.bratterycharging.boss.dao.UserDAO;
import com.token.iot.bratterycharging.boss.web.UserDTO;

@Service
public class UserService {
	
	@Autowired
	private UserDAO dao;

	public PageInfo<UserDTO> list(int pageNo, int pageSize) {
		// 注入插件参数
		PageHelper.startPage(pageNo, pageSize);
		// 执行sql
		List<UserDTO> list = dao.selectUsers();
		PageInfo pageInfo = new PageInfo(list);
		return pageInfo;
	}
}
